import { AppRouteRecordRaw } from '@/types/route'
import { shallowRef } from 'vue'
import Layout from '@/layout/index.vue'

export let systemRouter: AppRouteRecordRaw = {
  path: '/tenant',
  name: 'tenant',
  component: shallowRef(Layout),
  meta: {
    title: '租户中心',
    icon: 'icon-a-zuhuzhongxin_iconbeifen2'
  },
  children: [
    {
      path: '/tenant/manage',
      component: () => import(/* webpackChunkName: "tenant" */ '@/views/tenant/manage/tenantManage.vue'),
      name: 'tenantManage',
      meta: { title: '企业管理' }
    },
    {
      path: '/tenant/user',
      component: () => import(/* webpackChunkName: "tenant" */ '@/views/tenant/user/tenantUser.vue'),
      name: 'tenantUser',
      meta: { title: '企业用户管理' }
    },
    {
      path: '/tenant/company',
      component: () => import(/*webpackChunkName: "companyManage" */ '@/views/tenant/company/companyManage.vue'),
      name: 'companyManage',
      meta: { title: '全部企业管理' }
    }
  ]
}

export default systemRouter
